Optimal. Leaf size=54 \[ \frac{a (A-i B)}{c f (\tan (e+f x)+i)}+\frac{a B \log (\cos (e+f x))}{c f}+\frac{i a B x}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0880086, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 39, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.051, Rules used = {3588, 43} \[ \frac{a (A-i B)}{c f (\tan (e+f x)+i)}+\frac{a B \log (\cos (e+f x))}{c f}+\frac{i a B x}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3588
Rule 43
Rubi steps
\begin{align*} \int \frac{(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{c-i c \tan (e+f x)} \, dx &=\frac{(a c) \operatorname{Subst}\left (\int \frac{A+B x}{(c-i c x)^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(a c) \operatorname{Subst}\left (\int \left (\frac{-A+i B}{c^2 (i+x)^2}-\frac{B}{c^2 (i+x)}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{i a B x}{c}+\frac{a B \log (\cos (e+f x))}{c f}+\frac{a (A-i B)}{c f (i+\tan (e+f x))}\\ \end{align*}
Mathematica [B] time = 1.74528, size = 123, normalized size = 2.28 \[ \frac{a (\sin (e+f x)-i \cos (e+f x)) \left (\cos (e+f x) \left (A+i B \log \left (\cos ^2(e+f x)\right )-4 B f x-i B\right )+\sin (e+f x) \left (i A+B \log \left (\cos ^2(e+f x)\right )+4 i B f x+B\right )+2 B \tan ^{-1}(\tan (2 e+f x)) (\cos (e+f x)-i \sin (e+f x))\right )}{2 c f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.038, size = 64, normalized size = 1.2 \begin{align*}{\frac{-iBa}{cf \left ( \tan \left ( fx+e \right ) +i \right ) }}+{\frac{Aa}{cf \left ( \tan \left ( fx+e \right ) +i \right ) }}-{\frac{aB\ln \left ( \tan \left ( fx+e \right ) +i \right ) }{cf}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.45096, size = 112, normalized size = 2.07 \begin{align*} \frac{{\left (-i \, A - B\right )} a e^{\left (2 i \, f x + 2 i \, e\right )} + 2 \, B a \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{2 \, c f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.52932, size = 90, normalized size = 1.67 \begin{align*} \frac{B a \log{\left (e^{2 i f x} + e^{- 2 i e} \right )}}{c f} + \begin{cases} \frac{\left (- i A a e^{2 i e} - B a e^{2 i e}\right ) e^{2 i f x}}{2 c f} & \text{for}\: 2 c f \neq 0 \\\frac{x \left (A a e^{2 i e} - i B a e^{2 i e}\right )}{c} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.54162, size = 184, normalized size = 3.41 \begin{align*} -\frac{\frac{2 \, B a \log \left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + i\right )}{c} - \frac{B a \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right )}{c} - \frac{B a \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right )}{c} - \frac{3 \, B a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 2 \, A a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 8 i \, B a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 3 \, B a}{c{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + i\right )}^{2}}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]